<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:f="http://xmlns.jcp.org/jsf/core"
      xmlns:p="http://primefaces.org/ui">

    <ui:composition template="/index.xhtml">
        <ui:define name="title"/>
        <ui:define name="body">

            <h:form>
                <p:panel id="panel" header="#{bundle.CreateTblCuotaTitle}" style="margin-bottom:5px;">
                    <h:panelGroup id="messagePanel" layout="block">
                        <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
                    </h:panelGroup>

                    <h:panelGrid columns="3" cellpadding="3">

                        <p:outputLabel value="#{bundle.CreateTblCuotaLabel_fecha}" for="fecha" />
                        <p:calendar id="fecha" value="#{tblCuotaController.selected.fecha}" title="#{bundle.CreateTblCuotaTitle_fecha}" required="true" requiredMessage="#{bundle.CreateTblCuotaRequiredMessage_fecha}" effect="fold" pattern="dd-MM-yyyy">
                            <f:validateLength minimum="2" />
                        </p:calendar>
                        <p:message for="fecha" /> 

                        <p:outputLabel value="#{bundle.CreateTblCuotaLabel_valor}" for="valor" />
                        <p:inputText id="valor" value="#{tblCuotaController.selected.valor}" title="#{bundle.CreateTblCuotaTitle_valor}" required="true" requiredMessage="#{bundle.CreateTblCuotaRequiredMessage_valor}">
                            <f:validateLength minimum="2" />
                        </p:inputText>
                        <p:message for="valor" />

                        <p:outputLabel value="#{bundle.CreateTblCuotaLabel_tblNatilleraPersona}" for="tblNatilleraPersona" />
                        <p:selectOneMenu id="tblNatilleraPersona" value="#{tblCuotaController.selected.tblNatilleraPersona}" required="true" requiredMessage="#{bundle.CreateTblCuotaRequiredMessage_tblNatilleraPersona}">
                            <h:selectOneMenu title="#{bundle.CreateTblCuotaTitle_tblNatilleraPersona}"/>
                            <f:selectItems value="#{tblNatilleraPersonaController.itemsAvailableSelectOne}"/>
                            <f:validateLength minimum="2" />
                        </p:selectOneMenu>
                        <p:message for="tblNatilleraPersona" />


                        <p:outputLabel value="#{bundle.CreateTblCuotaLabel_concepto}" for="concepto" />
                        <p:selectOneMenu id="concepto" value="#{tblCuotaController.selected.concepto}" required="true" requiredMessage="#{bundle.CreateTblCuotaRequiredMessage_concepto}">
                            <h:selectOneMenu title="#{bundle.CreateTblCuotaTitle_concepto}" />
                            <f:selectItems value="#{tblConceptoController.itemsAvailableSelectOne}"/>
                            <f:validateLength minimum="2" />
                        </p:selectOneMenu>
                        <p:message for="concepto" />

                    </h:panelGrid>
                    <br/>
                    <p:separator style="margin-bottom:15px;" />

                    <p:commandButton action="#{tblCuotaController.create}" value="#{bundle.CreateTblCuotaSaveLink}" update="panel" icon="ui-icon-plus" style="margin:0"/>
                    <br /><br />
                    <p:commandButton action="#{tblCuotaController.prepareList}" value="#{bundle.CreateTblCuotaShowAllLink}" icon="ui-icon-check"/>
                </p:panel>
            </h:form>
        </ui:define>
    </ui:composition>

</html>
